.TH std::atomic::fetch_or 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic::fetch_or \- std::atomic::fetch_or

.SH Synopsis
   member only of atomic<Integral > specializations
   T fetch_or( T arg, std::memory_order order =                       \fB(1)\fP \fI(since C++11)\fP
                          std::memory_order_seq_cst ) noexcept;
   T fetch_or( T arg, std::memory_order order =
                          std::memory_order_seq_cst ) volatile        \fB(2)\fP \fI(since C++11)\fP
   noexcept;

   Atomically replaces the current value with the result of bitwise OR of the value and
   arg. The operation is read-modify-write operation. Memory is affected according to
   the value of order.

   It is deprecated if std::atomic<T>::is_always_lock_free is false and   \fI(since C++20)\fP
   overload \fB(2)\fP participates in overload resolution.

.SH Parameters

   arg   - the other argument of bitwise OR
   order - memory order constraints to enforce

.SH Return value

   The value immediately preceding the effects of this function in the modification
   order of *this.

.SH See also

   atomic_fetch_or          replaces the atomic object with the result of bitwise OR
   atomic_fetch_or_explicit with a non-atomic argument and obtains the previous value
   \fI(C++11)\fP                  of the atomic
   \fI(C++11)\fP                  \fI(function template)\fP
